<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="cs20941">DROP DOMAIN</title><body><p id="sql_command_desc">Removes a domain.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP DOMAIN [IF EXISTS] <varname>name</varname> [, ...]  [CASCADE | RESTRICT]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP DOMAIN</codeph> removes a previously defined domain. You
must be the owner of a domain to drop it.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the domain does not exist. A notice is issued
in this case. </pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of an existing domain.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the domain (such as table
columns). </pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the domain if any objects depend on it. This is the
default.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Drop the domain named <codeph>zipcode</codeph>: </p><codeblock>DROP DOMAIN zipcode;</codeblock></section><section id="section6"><title>Compatibility</title><p>This command conforms to the SQL standard, except for the <codeph>IF
EXISTS</codeph> option, which is a Greenplum Database extension. </p></section><section id="section7"><title>See Also</title><p><codeph><xref href="ALTER_DOMAIN.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="CREATE_DOMAIN.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
